<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>客户管理系统</title>
<!-- 项目基准路径 -->
<base href="/bestinc/" />
<!-- layui的JS引用 -->
<script type="text/javascript" src="static/layui/layui.js"></script>
<!-- layui的CSS引用 -->
<link rel="stylesheet" href="static/layui/css/layui.css" media="all" />
<!-- 引入自定义工具css -->
<link rel="stylesheet" href="static/css/system/customer/customer.css" media="all" />
<!-- 引入自定义工具js -->
<script type="text/javascript" src="static/js/system/customer/customer.js"></script>
</head>

<body>
	<div id="content">
		<!-- 头部搜索框 -->
		<div id="search-header">
			<form class="layui-form">
				<div class="layui-form-item">
					<div class="layui-inline">
						<label class="layui-form-label">客户名</label>
						<div class="layui-input-inline">
							<input type="text" name="customerName" id="customerNameSearch"
								placeholder="请输入" autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">客户手机</label>
						<div class="layui-input-inline">
							<input type="text" name="customerPhone" id="customerPhoneSearch"
								placeholder="请输入" autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">地址</label>
						<div class="layui-input-inline">
							<input type="text" name="address" id="addressSearch"
								placeholder="请输入" autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">联系人名</label>
						<div class="layui-input-inline">
							<input type="text" name="contactsName" id="contactsNameSearch"
								placeholder="请输入" autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">联系人手机</label>
						<div class="layui-input-inline">
							<input type="text" name="contactsPhone" id="contactsPhoneSearch"
								placeholder="请输入" autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">联系人地址</label>
						<div class="layui-input-inline">
							<input type="text" name="contactsAddress"
								id="contactsAddressSearch" placeholder="请输入" autocomplete="off"
								class="layui-input">
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label"></label>
						<div class="layui-input-inline">
							<button class="layui-btn" lay-submit=""
								lay-filter="customerSearchBtn">
								<i class="layui-icon layui-icon-search"></i> 查询
							</button>
							<button class="layui-btn" type="reset">
								<i class="layui-icon layui-icon-refresh"></i> 重置
							</button>
						</div>
					</div>
				</div>
			</form>
		</div>

		<div id="dataTable">
			<!-- 数据表格 -->
			<table class="layui-hide" id="customerTable"
				lay-filter="customerTableEvent">
			</table>
		</div>

		<!-- 添加模态框 -->
		<div id="addCustomerModal" class="definedModal">
			<!-- 这里手动加表单样式 -->
			<form id="addCustomerForm" lay-filter="addCustomerForm"
				class="layui-form" action="">
				<div class="layui-form-item">
					<label class="layui-form-label">客户名</label>
					<div class="layui-input-block">
						<input type="text" name="customerName" lay-verify="customerName" my-verify="addCustomerName"
							placeholder="请输入客户名" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">客户手机</label>
					<div class="layui-input-block">
						<input type="text" name="customerPhone" my-verify="addCustomerPhone"
							placeholder="请输入客户手机" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">地址</label>
					<div class="layui-input-block">
						<input type="text" name="address" my-verify="addAddress"
							placeholder="请输入地址" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">联系人名</label>
					<div class="layui-input-block">
						<input type="text" name="contactsName" my-verify="addContactsName"
							placeholder="请输入联系人名" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">联系人手机</label>
					<div class="layui-input-block">
						<input type="text" name="contactsPhone" my-verify="addContactsPhone"
							placeholder="请输入联系人手机" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">联系人地址</label>
					<div class="layui-input-block">
						<input type="text" name="contactsAddress" my-verify="addContactsAddress"
							placeholder="请输入联系人地址" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item layui-form-text">
					<label class="layui-form-label">描述</label>
					<div class="layui-input-block">
						<textarea name="description" lay-verify="description" placeholder="请输入内容"
							class="layui-textarea"></textarea>
					</div>
				</div>
				<!-- <div class="layui-form-item">
					<div class="layui-input-block">
						<button type="submit" class="layui-btn" lay-submit=""
							lay-filter="addCustomerBtn">立即提交</button>
						<button type="button" class="layui-btn modalClose">关闭</button>
					</div>
				</div> -->
			</form>
		</div>

		<!-- 修改模态框 -->
		<div id="updateCustomerModal" class="definedModal">
			<!-- 这里手动加表单样式 -->
			<form id="updateCustomerForm" lay-filter="updateCustomerForm"
				class="layui-form" action="">
				<input type="hidden" name="_method" value="PUT"/>
				<input type="hidden" name="customerId" my-verify="updateCustomerId"
							placeholder="请输入客户ID" autocomplete="off" class="layui-input">
				<div class="layui-form-item">
					<label class="layui-form-label">客户名</label>
					<div class="layui-input-block">
						<input type="text" name="customerName" my-verify="updateCustomerName"
							placeholder="请输入客户名" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">客户手机</label>
					<div class="layui-input-block">
						<input type="text" name="customerPhone" my-verify="updateCustomerPhone"
							placeholder="请输入客户手机" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">地址</label>
					<div class="layui-input-block">
						<input type="text" name="address" my-verify="updateAddress"
							placeholder="请输入地址" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">联系人名</label>
					<div class="layui-input-block">
						<input type="text" name="contactsName" my-verify="updateContactsName"
							placeholder="请输入联系人名" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">联系人手机</label>
					<div class="layui-input-block">
						<input type="text" name="contactsPhone" my-verify="updateContactsPhone"
							placeholder="请输入联系人手机" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">联系人地址</label>
					<div class="layui-input-block">
						<input type="text" name="contactsAddress" my-verify="updateContactsAddress"
							placeholder="请输入联系人地址" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item layui-form-text">
					<label class="layui-form-label">描述</label>
					<div class="layui-input-block">
						<textarea name="description" placeholder="请输入内容"
							class="layui-textarea"></textarea>
					</div>
				</div>
				<!-- <div class="layui-form-item">
					<div class="layui-input-block">
						<button type="submit" class="layui-btn" lay-submit=""
							lay-filter="updateCustomerBtn">立即提交</button>
						<button type="button" class="layui-btn modalClose">关闭</button>
					</div>
				</div> -->
			</form>
		</div>

		<!-- 头部工具栏 -->
		<script type="text/html" id="customerToolbar">
			<div class="layui-btn-group">
				<button lay-event="addCustomer" class="layui-btn layui-btn-primary layui-btn-sm" title="添加"><i class="layui-icon">&#xe654;</i>添加 </button>
				<button lay-event="updateCustomer" class="layui-btn layui-btn-primary layui-btn-sm" title="修改"><i class="layui-icon">&#xe642</i>修改 </button>
				<button lay-event="frozenCustomer" class="layui-btn layui-btn-primary layui-btn-sm" title="禁用"><i class="layui-icon">&#xe702;</i>禁用 </button>
				<button lay-event="recoverCustomer" class="layui-btn layui-btn-primary layui-btn-sm" title="恢复"><i class="layui-icon">&#xe666;</i>恢复 </button>
			</div>
		</script>

		<!-- 禁用和回复 -->
		<script type="text/html" id="checkboxTpl">
			<span {{d.useable==1? 'class="useable font-color font-size my-bg-green"': 'class="useable font-color font-size my-bg-red"'}}>{{d.useable==1?'可用':'禁用'}}</span>
		</script>
	</div>
</body>
</html>
